﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FreedomERP.Models;
using FreedomERP.Comm;

namespace FreedomERP.Dao.Bd
{
    /// <summary>
    /// 作者：陈新杰
    /// BdCategory数据库管理接口
    /// </summary>
    interface IBdCategoryDao
    {

        /// <summary>
        /// 查找BdCategory信息，根据各参数进行动态查询
        /// </summary>
        /// <param name="fId"></param>
        /// <param name="fOrgunited"></param>
        /// <param name="fType"></param>
        /// <param name="fName"></param>
        /// <param name="fNumber"></param>
        /// <param name="fRemark"></param>
        /// <param name="isDesc"></param>
        /// <returns></returns>
        DAOResult<BdCategory> findBdCategories(String fId, String fOrgunited, String fType, String fName, String fNumber, String fRemark, String fStatus, Boolean isDesc, int start, int limit, out int totalCount);

        /// <summary>
        /// 查找产品规格类型信息，根据各参数进行动态查询
        /// </summary>
        /// <param name="fId"></param>
        /// <param name="fOrgunited"></param>
        /// <param name="fName"></param>
        /// <param name="fNumber"></param>
        /// <param name="fRemark"></param>
        /// <param name="isDesc"></param>
        /// <returns></returns>
        DAOResult<BdCategory> findProdModelTypes(String fId, String fOrgunited, String fName, String fNumber, String fRemark, String fStatus, Boolean isDesc, int start, int limit, out int totalCount);

        /// <summary>
        /// 查找产品单位类型信息，根据各参数进行动态查询
        /// </summary>
        /// <param name="fId"></param>
        /// <param name="fOrgunited"></param>
        /// <param name="fName"></param>
        /// <param name="fNumber"></param>
        /// <param name="fRemark"></param>
        /// <param name="isDesc"></param>
        /// <returns></returns>
        DAOResult<BdCategory> findProdUnitTypes(String fId, String fOrgunited, String fName, String fNumber, String fRemark, String fStatus, Boolean isDesc, int start, int limit, out int totalCount);

        /// <summary>
        /// 查找产品状态类型信息，根据各参数进行动态查询
        /// </summary>
        /// <param name="fId"></param>
        /// <param name="fOrgunited"></param>
        /// <param name="fName"></param>
        /// <param name="fNumber"></param>
        /// <param name="fRemark"></param>
        /// <param name="isDesc"></param>
        /// <returns></returns>
        DAOResult<BdCategory> findProdStatusTypes(String fId, String fOrgunited, String fName, String fNumber, String fRemark, Boolean isDesc, int start, int limit, out int totalCount);


        /// <summary>
        /// 查找产品价格类型信息，根据各参数进行动态查询
        /// </summary>
        /// <param name="fId"></param>
        /// <param name="fOrgunited"></param>
        /// <param name="fName"></param>
        /// <param name="fNumber"></param>
        /// <param name="fRemark"></param>
        /// <param name="isDesc"></param>
        /// <returns></returns>
        DAOResult<BdCategory> findProdPriceTypes(String fId, String fOrgunited, String fName, String fNumber, String fRemark, Boolean isDesc, int start, int limit, out int totalCount);


        /// <summary>
        /// 更改或保存BdCategory信息
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        DAOResult<String> saveOrUpdateBdCategory(BdCategory category);


        /// <summary>
        /// 删除BdCategory信息
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        DAOResult<BdCategory> deleteProdCategory(String fId);



        /// <summary>
        /// 根据FType获取Category列表
        /// </summary>
        /// <param name="FType"></param>
        /// <author>梁建东</author>
        /// <returns></returns>
        List<BdCategory> QueryCategoryListByFType(String FType);

        /// <summary>
        /// 根据FType和FNumber获取Category的FId
        /// </summary>
        /// <param name="FType"></param>
        /// <param name="FNumber"></param>
        /// <author>梁建东</author>
        /// <returns></returns>
        string QueryCategoryFIdByFTypeAndFNumber(String FType,String FNumber);

        /// <summary>
        /// 根据FId获取资料分类
        /// </summary>
        /// <param name="FId"></param>
        /// <author>姚少鹏</author>
        /// <returns></returns>
        BdCategory getCategoryByFId(string FId);

        /// <summary>
        /// 根据FName和FType获取资料分类
        /// </summary>
        /// <param name="FName">状态名称</param>
        /// <param name="FType">状态类型</param>
        /// <author>姚少鹏</author>
        /// <returns></returns>
        BdCategory getCategory(string FName, string FType);
    }
}
